home *** CD-ROM | disk | FTP | other *** search
- IDT 'CONV'
- ************************************************************************
- *
- * A general routine for a length-N linear convolution.
- * For this particular implementation, N = 32 and implements
- * a bandpass FIR filter with linear phase.
- *
- ************************************************************************
- *
- XNEW EQU 0 * Newest input sample (always at location 0)
- X EQU 31 * End of data points X
- H EQU 63 * End of impulse response sequence
- YOUT EQU 64 * Output location
- ONE EQU 65 * Contains the value 1
- *
- AORG 0
- B START * Branch to the beginning of the program
- *
- * Impulse response terms.
- *
- H1 DATA >02C0
- H2 DATA >00E9
- H3 DATA >FFC6
- H4 DATA >01B5
- H5 DATA >FFCD
- H6 DATA >FA22
- H7 DATA >FBC3
- H8 DATA >0380
- H9 DATA >03A5
- H10 DATA >FFE6
- H11 DATA >0694
- H12 DATA >0AB0
- H13 DATA >F6A8
- H14 DATA >E250
- H15 DATA >F6BA
- H16 DATA >1F1C
- H17 DATA >1F1C
- H18 DATA >F6BA
- H19 DATA >E250
- H20 DATA >F6A8
- H21 DATA >0AB0
- H22 DATA >0694
- H23 DATA >FFE6
- H24 DATA >03A5
- H25 DATA >0380
- H26 DATA >FBC3
- H27 DATA >FA22
- H28 DATA >FFCD
- H29 DATA >01B5
- H30 DATA >FFC6
- H31 DATA >00E9
- H32 DATA >02C0
- *
- * Begin Program.
- *
- START LDPK 0
- LACK 1
- SACL ONE * ONE = 1
- *
- LARK AR0,H * AR0 addresses data locations
- LARK AR1,31 * AR1 is used as a loop counter
- LACK H32
- LOADH LARP AR0 * Load the impulse response
- TBLR *-,AR1
- SUB ONE
- BANZ LOADH
- *
- LARK AR1,X * AR1 used to address data and as a counter
- ZAC
- LOADX SACL * * Initialize filter
- BANZ LOADX
- *
- LARP AR0
- NXTPT IN XNEW,PA0 * Get next input sample
- *
- LARK AR0,X * AR0 points to the input sequence
- LARK AR1,H * AR1 points to the impulse response
- *
- ZAC
- LT *-,AR1
- MPY *-,AR0
- LOOP LTD *,AR1 * Load and move input sequence, accumulate result
- MPY *-,AR0 * Multiply impulse response
- BANZ LOOP * Loop N times
- *
- APAC * Accumulate last multiply
- SACH YOUT,1
- OUT YOUT,PA1 * Output accumulated result
- *
- B NXTPT * Get the next input sample
- END